#!/bin/zsh

if [ -f /srv/install.sh ]; then
	/srv/dos2unix /srv/install.sh 
	/bin/chmod +x /srv/install.sh 
	echo -n "source script /srv/install.sh: "
	source /srv/install.sh 
	echo "[ "${GREEN_START}"OK"${GREEN_STOP}" ]"
fi

if [ -d /srv/entrypoint.d ]; then
	echo "Run scripts in /srv/entrypoint.d"
	for file in `ls /srv/entrypoint.d`;
	do
		path=/srv/entrypoint.d/$file
		/srv/dos2unix $path 
		/bin/chmod +x $path
		log "Running $file start"
		$path start
	done
fi
